Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix h2 protocol abnormal case when SETTINGS_HEADER_TABLE_SIZE set to zero #2373

Merged

Conversation

982945902
Copy link
Contributor

What problem does this PR solve?

when use h2:grpc protocol pass nginx, if nginx not support dynamic HPACK, it will set SETTINGS_HEADER_TABLE_SIZE value to 0,now brpc not address this case.

https://trac.nginx.org/nginx/ticket/1538
rfc reference: https://datatracker.ietf.org/doc/html/rfc9113 4.3.1

Issue Number:

#2286
#2176

Problem Summary:
ignore a h2 protocol param set case

What is changed and the side effects?

Changed:
add a if check when encode h2 header

Side effects:

  • Performance effects(性能影响):
    It hardly makes a difference

  • Breaking backward compatibility(向后兼容性):
    completely compatible


Check List:

  • Please make sure your changes are compilable(请确保你的更改可以通过编译).
  • When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
  • Please follow Contributor Covenant Code of Conduct.(请遵循贡献者准则).

@982945902
Copy link
Contributor Author

Put it another way because of dynamic table size limitation, HTTP/2.0 uses dynamic tables to store the most recently used request header fields for compression and reuse. If the dynamic table reaches a size limit, the new request Header Field is sent using the Literal Header Field without Indexing encoding to avoid overflows.

@982945902
Copy link
Contributor Author

https://datatracker.ietf.org/doc/html/rfc7541#section-4.2 about Maximum Table Size

@wwbmmm
Copy link
Contributor

wwbmmm commented Sep 7, 2023

LGTM

@wwbmmm wwbmmm merged commit 7247c6a into apache:master Oct 25, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants